package org.geektimes.projects.user.validator.bean.validation;

import org.geektimes.util.ValidatorUtils;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class UserValidAnnotationValidator implements ConstraintValidator<UserValid, String> {

    private boolean idRange;

    public void initialize(UserValid annotation) {
        this.idRange = annotation.idRange();
    }

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        return ValidatorUtils.isMobile(value);
    }


}
